home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / MPW / Scripts / InteractiveHelp < prev    next >
Encoding:
Text File  |  1996-06-03  |  2.2 KB  |  76 lines  |  [TEXT/MPS ]

  1. # InteractiveHelp
  2. #
  3. # This script is a dialog-driven interface to the MPW Help command.
  4. # It is used to implement the MPW Help menu item on the Balloon Help
  5. # menu.
  6. #
  7. #    Usage:
  8. #        InteractiveHelp
  9. #
  10. #    
  11. #    © Copyright Apple Computer, Inc. 1994-1996
  12. #    All rights reserved.
  13.  
  14. set exit 0
  15. set Category "`GetListItem -m "Please select a category." ∂
  16.                -d 'MPW Help Summary' 'Command Summary' ∂
  17.                'Editing Commands' 'File System Commands' 'Languages' ∂
  18.                'Projector Commands' 'PowerMacintosh Development' ∂
  19.                'MPW Scripting Summary' 'System Commands' ∂
  20.                'Miscellaneous Commands' 'Window Commands' ∂
  21.                'Resource Commands' 'Application Launching' ∂
  22.                'Expressions' 'Patterns' 'Selections' ∂
  23.                'Special Characters' 'MPW Shortcuts' 'Special Variables' ∂
  24.                'Help for a Specific Command…'; set temp "{status}"`"
  25. exit 0 if "{temp}"
  26.  
  27. if {Category} == 'Help for a Specific Command…'
  28.     set CommandList "`help commands | StreamEdit -e ' ∂
  29.                                         /[     ]*Help ≈#≈/ ∂
  30.                                             Replace /[     ]*Help ([¬     #]+)®1[     #]+≈/®1; ∂
  31.                                             print; ∂
  32.                                         1,$ Delete'`"
  33.     set Category "`GetListItem -m 'Please select a command.' ∂
  34.                    {CommandList}; set temp "{status}"`"
  35.     exit 0 if "{temp}"
  36. end
  37.  
  38. open -n "{TempFolder}Help Window"
  39. saveonclose -n "{TempFolder}Help Window"
  40.  
  41. if {Category} == 'MPW Help Summary'
  42.     help
  43. else if {Category} == 'Command Summary'
  44.     help Commands
  45. else if {Category} == 'Editing Commands'
  46.     help Editing
  47. else if {Category} == 'File System Commands'
  48.     help FileSystem
  49. else if {Category} == 'Projector Commands'
  50.     help Projector
  51. else if {Category} == 'PowerMacintosh Development'
  52.     help PowerMacintosh
  53. else if {Category} == 'MPW Scripting Summary'
  54.     help Scripting
  55. else if {Category} == 'System Commands'
  56.     help System
  57. else if {Category} == 'Miscellaneous Commands'
  58.     help Miscellaneous
  59. else if {Category} == 'Window Commands'
  60.     help Window
  61. else if {Category} == 'Resource Commands'
  62.     help Resources
  63. else if {Category} == 'Application Launching'
  64.     help Launch
  65. else if {Category} == 'Special Characters'
  66.     help Characters
  67. else if {Category} == 'MPW Shortcuts'
  68.     help Shortcuts
  69. else if {Category} == 'Special Variables'
  70.     help Variables
  71. else
  72.     help {Category}
  73. end ∑ "{TempFolder}Help Window"
  74.  
  75.  
  76.